package com.easylinkin.linkappapi.application.entity;

import com.baomidou.mybatisplus.annotation.*;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

import java.io.Serializable;
import java.util.Date;

/**
 * <p>
 * 应用管理表
 * </p>
 *
 * @author XuGuoQing
 * @since 2020-05-19
 */
@Data
@EqualsAndHashCode(callSuper = false)
@Accessors(chain = true)
@TableName("linkapp_application")
public class Application extends Model<Application> {

    private static final long serialVersionUID = 1L;

    /**
     * 主键id
     */
    @TableId("id")
    private String id;

    /**
     * 个性化id
     */
    @TableId("personality_id")
    private String personalityId;


    /**
     * 应用名称
     */
    @TableField("name")
    private String name;

    /**
     * 描述
     */
    @TableField(value ="description", strategy = FieldStrategy.NOT_NULL )
    private String description;


    /**
     * 创建人id
     */
    @TableField("creator")
    private String creator;

    /**
     * 创建时间
     */
    @TableField("create_time")
    private Date createTime;

    /**
     * 修改人id
     */
    @TableField("modifier")
    private String modifier;

    /**
     * 修改时间
     */
    @TableField("modify_time")
    private Date modifyTime;

    /**
     * 是否删除字段 0:已删; 1:存在
     */
    @TableField("delete_state")
    @TableLogic(value = "1", delval = "0")
    private Integer deleteState = 1;

    /**
     * 默认域名
     */
    @TableField(exist = false)
    private String domin;



    /**
     * appKey
     */
    @TableField("app_key")
    private String appKey;

    /**
     * app_secret
     */
    @TableField("app_secret")
    private String appSecret;


    @Override
    protected Serializable pkVal() {
        return this.id;
    }

}
